package com.core.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

/**
 * 用户
 */
public class UserDto {
	/** 创建时间 */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;
	/** 主键 */
	private String id;
	/** 登陆名 */
    @Length(max =50 ,message = "长度不能超过50位")
    @NotEmpty(message = "登陆名必填")
	private String loginName;
	/** 昵称 */
    @Length(max =50 ,message = "长度不能超过50位")
	private String name;
	/** 密码 */
    @NotEmpty(message = "密码必填")
	private String password;
	/** 用户状态1正常0禁用 */
	private Integer status;

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public String getId() {
		return this.id;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	
	public String getLoginName() {
		return this.loginName;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getPassword() {
		return this.password;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public Integer getStatus() {
		return this.status;
	}

	
    
    @Override
    public String toString() {
        return "User{" +
		"createTime=" + createTime +
		",id='" + id + "'" + 
		",loginName='" + loginName + "'" + 
		",name='" + name + "'" + 
		",password='" + password + "'" + 
		",status='" + status + "'" + 
                '}';
    }
	
}